package com.wangyk.user.controller;

import com.wangyk.rabbitmqcommon.VO.ResultVO;
import com.wangyk.user.pojo.UploadFileReq;
import com.wangyk.user.service.UploadFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/upload")
@Slf4j
public class UploadFileController
{
    @Autowired
    private UploadFileService uploadFileService;

    @RequestMapping("/upload_file.do")
    @ResponseBody
    public ResultVO uploadFile(@ModelAttribute UploadFileReq uploadFileReq)
    {
        log.error("进来了");
        return uploadFileService.uploadFile(uploadFileReq);
    }
}

